package com.colin.paymentservice12001.controller;

import com.colin.common.response.R;
import com.colin.paymentservice12001.service.PaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class PaymentController {


    @Autowired
    private PaymentService paymentService;

    /**
     * 支付接口
     * @param orderNum 订单号 ORDER_时间戳_用户id
     * @return R
     *         data: Object
     */
    @PostMapping("/payment/{orderNum}")
    public R<Object> doPay(@PathVariable String orderNum) {
        return paymentService.doPay(orderNum);
    }
}
